home *** CD-ROM | disk | FTP | other *** search
/ Softdisk for Windows 42 / Softdisk for Windows 42.iso / QUARRY / QUARRY.EXE / QUARRY.dxr / 00085_DOHAMMERRED.ls < prev    next >
Encoding:
Text File  |  1998-01-01  |  958 b   |  45 lines

  1. on DOHAMMERRED
  2.   global GRIDV, GRIDH, GRIDY, TY, TH, NYC, DT, TURN, SOND
  3.   set TY to 0
  4.   set TH to 0
  5.   repeat with N = 1 to 15
  6.     set NYC to random(125)
  7.     if (getAt(GRIDV, NYC) = 3) and (getAt(GRIDV, NYC + 14) = 1) then
  8.       set TY to getAt(GRIDY, NYC)
  9.       set TH to getAt(GRIDH, NYC)
  10.     end if
  11.     if TY <> 0 then
  12.       exit repeat
  13.     end if
  14.   end repeat
  15.   if TY = 0 then
  16.     exit
  17.   end if
  18.   if SOND = 0 then
  19.     puppetSound("FALL")
  20.   end if
  21.   updateStage()
  22.   if SOND = 0 then
  23.     puppetSound("HAMMER")
  24.   end if
  25.   set DT to 2
  26.   set the locH of sprite 29 to TH
  27.   set the locV of sprite 29 to TY
  28.   repeat with N = 1 to 10
  29.     set the castNum of sprite 29 to 82
  30.     updateStage()
  31.     COUNTTIME()
  32.     set the castNum of sprite 29 to 83
  33.     updateStage()
  34.     COUNTTIME()
  35.   end repeat
  36.   if TURN = 1 then
  37.     set the castNum of sprite 29 to 4
  38.   end if
  39.   if TURN = 2 then
  40.     set the castNum of sprite 29 to 70
  41.   end if
  42.   updateStage()
  43.   REMOVESPRITE()
  44. end
  45.